<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="jquery/jquery.min.js"></script>
	</head>
	<body>
		<div><span id="itemId">商品编号：</span></div>
		<div><span id="itemPrice">商品价格</span></div>
	</body>
	<script>
		$.ajax({
			type:"POST",
			url:"https://p.3.cn/prices/mgets",
			data:{
				"skuIds":"j_100005185603"
			},
			contentType:"application/json,charset=utf-8",
			dataType:"jsonp",
			success:function(data){
				console.log("访问成功")
				console.log(data)
				
				var item=data[0]
				var itemId=item.id
				var itemPrice=item.p
				console.log(itemId)
				console.log(itemPrice)
				
				var id=$("#itemId")
				id.text(itemId)
				id.css("color","blue")
				
				var price=$("#itemPrice")
				price.text(itemPrice)
				price.css("color","red")
			},
			error:function(e){
				console.log("访问失败")
			}
		})
	</script>
</html>
